<template>
    <p>子组件</p>
    <p>props</p>
    <p>foo:{{foo}}</p>
    <p>age:{{age}}</p>
</template>

<script setup>

const props = defineProps({
    foo:String,
    age:Number
})

//const props = defineProps(['foo','age'])

console.log(props.foo)
</script>